package com.bank.manage.controller;

import com.bank.manage.model.param.FaceRecordParam;
import com.bank.manage.model.vo.FaceRecordVo;
import com.bank.manage.service.FaceRecordService;
import jakarta.validation.Valid;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.gavin.core.annotation.LogRecord;
import org.gavin.core.annotation.Safety;
import org.gavin.core.domain.R;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;

/**
 * FaceContorller
 *
 * @author grl
 * @date 2024/4/17
 */
@Slf4j
@Validated
@RestController
@RequiredArgsConstructor
public class FaceRecordController {

    private final FaceRecordService faceRecordService;
    /**
     * 保存人脸记录
     * @return
     */
    @Safety
    @LogRecord(description = "保存人脸记录")
    @PostMapping(value = "/face/record")
    public R<FaceRecordVo> getRequestVo(@RequestBody @Valid FaceRecordParam param){
        return R.ok(faceRecordService.faceRecord(param));
    }

}
